# Maintainer: Jaroslav Lichtblau <svetlemodry@archlinux.org>
# Contributor: Thomas Weißschuh <thomas t-8ch de>

_pkgname=Markups
pkgname=python-markups
pkgver=3.1.3
pkgrel=5
pkgdesc='Wrapper around various text markups'
arch=('any')
url='https://launchpad.net/python-markups'
license=('BSD')
depends=('python-markdown-math')
optdepends=('python-docutils: for reStructuredText language support'
            'python-pygments: for highlighting output style')
makedepends=('python-docutils' 'python-pygments' 'python-wheel' 'python-setuptools')
checkdepends=('python-tox')
#source=($pkgname-$pkgver.tar.gz::https://github.com/retext-project/pymarkups/archive/$pkgver.tar.gz)
source=("https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/${_pkgname}/${_pkgname}-${pkgver}.tar.gz"{,.asc})
sha256sums=('ab9747a72c1c6457418eb4276c79871977c13a654618e4f12e2a1f0990fbf2fc'
            'SKIP')
validpgpkeys=('F24299FF1BBC9018B906A4CB6026936D2F1C8AE0') # Dmitry Shachnev <mitya57@debian.org>

build() {
  cd "${srcdir}"/${_pkgname}-${pkgver}

  python setup.py build
}

package() {
  cd "${srcdir}"/${_pkgname}-${pkgver}
  python setup.py install --root="${pkgdir}" --optimize=1 --skip-build
  install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
}
